package com.wf.chatManagement.service.call.impl;

import com.wf.apicommons.entity.MessageBoard.LeavingAMessage;
import com.wf.apicommons.entity.MessageBoard.MqMessage;
import com.wf.apicommons.utils.CodeEnum;
import com.wf.apicommons.utils.CommonResult;
import com.wf.chatManagement.service.call.MessageBoardFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @Description: 服务降级处理类
 */
@Slf4j
@Component
public class FeignFallbackServiceImpl  implements MessageBoardFeignService {

    /**
     * 推送留言数据到MQ
     * @param data
     * @return
     */
    @Override
    public CommonResult<String> pushLeavingAMessageData(MqMessage<LeavingAMessage> data) {
        log.info("调用message-board-services服务失败，已降级处理");
        return CommonResult.fail(CodeEnum.SERVICE_CALL_EXCEPTION);

    }
}
